package D924;

import java.util.Scanner;

public class Test {
   static Guanli gl1 = new Guanli();
    public static void main(String[] args) {
       Guanli gl = new Guanli();

        System.out.println("欢迎来到图书馆管理系统");
        System.out.println("----1.查找书籍-----");
        System.out.println("----2.删除书籍-----");
        System.out.println("----3.查找书籍-----");
        System.out.println("----4.展示所有书籍-----");
        System.out.println("----5.删除书籍-----");
        Scanner jp = new Scanner(System.in);
        System.out.print("请输入要选择的编号");
        int xuze = jp.nextInt();

        switch (xuze){
            case 1:
                 add();
            case 2:
                shanchu();
            case 3:
                 chazhao();
            case 4:
                suoyou();
            case 5:
            default:

        }
    }

    public static void add(){

        Book b1 = new Book();
        Scanner jp = new Scanner(System.in);
        System.out.println("请输入书名");
        b1.bname = jp.next();
        System.out.println("请输入作者");
        b1.zuozhe = jp.next();
        System.out.println("请输入isbn");
        b1.isbn = jp.next();
        System.out.println("添加成功");
       gl1.tian(b1);

    }
    public static void shanchu(){

        Book b1 = new Book();
        Scanner jp = new Scanner(System.in);
        System.out.println("请输入删除的isbn");
        b1.bname = jp.next();
        System.out.println("删除成功");
        gl1.shan(b1.isbn);
    }

    public static void suoyou(){
        Book b1 = new Book();
        gl1.show();

    }
    public static void chazhao(){
        Book b1 = new Book();
        Scanner jp = new Scanner(System.in);
        System.out.println("请选择你要查找的isbn");
        int chazhao = jp.nextInt();
        gl1.cha(b1.isbn);

    }

}
